package org.kfive.nova.design.structture.composite;

/**
 * Created by admin on 2017-03-04.
 */
public class Leaf extends Component {
    public void add(Component component) {
        throw new UnsupportedOperationException("不支持的操作");
    }

    public void remove(Component component) {
        throw new UnsupportedOperationException("不支持的操作");
    }

    public Component getChild(int i) {
        throw new UnsupportedOperationException("不支持的操作");
    }

    public void operator() {
        System.out.println("call the operator method");
    }
}
